_require "../../../../basis.smi"
_require "../../../../smlformat-lib.smi"
_require "../../../data/symbols/main/RecordLabel.smi"
(* _require local "../../../data/symbols/main/Loc.smi" *)
(* _require local "../../../data/symbols/main/Symbol.smi" *)
_require "../../../libs/ids/main/LocalID.smi"
_require "../../../libs/env/main/SEnv.smi"

structure TermPrintUtils =
struct
  type format = SMLFormat.FormatExpression.expression list
  val makeLines : string -> format
  val format_string : string -> format
  val format_label : string -> format
  val format_char : char -> format

  val format_int : int -> format
  val format_int8 : Int8.int -> format
  val format_int16 : Int16.int -> format
  val format_int32 : Int32.int -> format
  val format_int64 : Int64.int -> format

  val format_intJson : int -> format
  val format_int8Json : Int8.int -> format
  val format_int16Json : Int16.int -> format
  val format_int32Json : Int32.int -> format
  val format_int64Json : Int64.int -> format

  val format_real : real -> format
  val format_realJson : real -> format
  val format_real32 : Real32.real -> format
  val format_real32Json : Real32.real -> format

  val format_word8 : Word8.word -> format
  val format_word16 : Word16.word -> format
  val format_word32 : Word32.word -> format
  val format_word64 : Word64.word -> format
  val format_IntInf : IntInf.int -> format
  val format_IntInfJson : IntInf.int -> format
  val formatElements 
    : 'a SMLFormat.BasicFormatters.formatter * format * format -> 'a list -> format
  val format_lazyArray 
    : 'a SMLFormat.BasicFormatters.formatter * format * format
       -> (int option -> {contents:'a list, hasEllipsis:bool}) -> format
  val formatPrependedOpt 
    : ('a -> format) * format -> 'a option -> format
  val formatOptCase 
    : ('a -> format) * format * format -> 'a option -> format
  val formatOption
    : ('a -> format) * format * format -> 'a option -> format
  val formatIfCons : format -> 'a list -> format
  val formatNonEmptyTypIDMap : format -> 'a TypID.Map.map -> format
  val formatRecordLabelMap
    : 'a SMLFormat.BasicFormatters.formatter * format -> 'a RecordLabel.Map.map -> format
  val formatRecordLabelMapForJSON
    : 'a SMLFormat.BasicFormatters.formatter * format -> 'a RecordLabel.Map.map -> format
  val formatSEnvMap
    : 'a SMLFormat.BasicFormatters.formatter * format -> 'a SEnv.map -> format
  val formatTypIDMap
    : 'a SMLFormat.BasicFormatters.formatter * format -> 'a TypID.Map.map -> format
end
